@import './config.scss';

.theme__dark .services {
  background: $dark-theme-gray-darkest;

  .services__webview-wrapper {
    background: $dark-theme-gray-darkest;
  }

  .services__webview,
  .services__info-layer {
    // webview { background: $dark-theme-gray-darkest; }
  }

  .services__no-service,
  .services__info-layer {
    background: $dark-theme-gray-darkest;

    h1 {
      color: $dark-theme-gray-lightest;
    }
  }
}

.mode__split {
  .services {
    display: flex;
    overflow: visible;

    .services__webview {
      position: relative;
      flex: 1 0 33.3333%;
      scroll-snap-align: start;
    }
  }

  @for $i from $split-columns-min through $split-columns-max {
    &[data-columns='#{$i}'] .services .services__webview {
      flex-basis: calc(100% / $i);
    }
  }
}

.services {
  background: #fff;
  flex: 1;
  height: 100%;
  order: 5;
  overflow: hidden;
  position: relative;

  .services__webview-wrapper {
    background: $theme-gray-lighter;
  }

  .services__webview,
  .services__info-layer {
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 0;

    webview {
      background: $theme-gray-lighter;
      display: inline-flex;
      height: 100%;
      width: 100%;
    }

    &.is-active {
      z-index: 100;
    }

    &--force-repaint webview {
      z-index: 5;
    }

    &.is-loading webview {
      background: #fff;
    }
  }

  .services__no-service,
  .services__info-layer {
    align-items: center;
    background: $theme-gray-lighter;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;

    h1 {
      color: $theme-gray-dark;
      margin: 25px 0 40px;
    }

    .button,
    button {
      margin: 40px 0 20px;
    }
  }

  .services__info-layer {
    position: absolute;
    z-index: 110;
  }
}
